//
//  NewActionViewController.swift
//  Woolgathering
//
//  Created by 范东 on 2022/3/7.
//

import UIKit

class NewActionViewController: BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        navigationItem.title = NSLocalizedString("Pick New Action", comment: "")
        navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addAction))
    }
    

    @objc func addAction(){
        presentAddVC()
    }
    
    func presentAddVC(){
        DispatchQueue.main.async {
            let addVC = NewActionAddViewController()
            addVC.delegate = self
            let addNav = BaseNavigationController(rootViewController: addVC)
            self.present(addNav, animated: true, completion: nil)
        }
    }

}

extension NewActionViewController: NewActionAddViewControllerDelegate{
    func addVC(addVC: NewActionAddViewController, didSave: ActionModel) {
        
    }
}
